package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ServiceFeeRulesMapper;
import com.ruoyi.system.domain.ServiceFeeRules;
import com.ruoyi.system.service.IServiceFeeRulesService;

/**
 * 服务费规则 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-19
 */
@Service
public class ServiceFeeRulesServiceImpl extends ServiceImpl<ServiceFeeRulesMapper, ServiceFeeRules> implements IServiceFeeRulesService
{
    @Autowired
    private ServiceFeeRulesMapper serviceFeeRulesMapper;

    /**
     * 通过id查询服务费规则
     *
     * @param id 服务费规则主键
     * @return 服务费规则
     */
    @Override
    public ServiceFeeRules selectServiceFeeRulesById(Long id)
    {
        return serviceFeeRulesMapper.selectServiceFeeRulesById(id);
    }

    /**
     * 查询服务费规则列表
     *
     * @param serviceFeeRules 服务费规则
     * @return 服务费规则
     */
    @Override
    public List<ServiceFeeRules> selectServiceFeeRulesList(ServiceFeeRules serviceFeeRules)
    {
        return serviceFeeRulesMapper.selectServiceFeeRulesList(serviceFeeRules);
    }

    /**
     * 新增服务费规则
     *
     * @param serviceFeeRules 服务费规则
     * @return 结果
     */
    @Override
    public int insertServiceFeeRules(ServiceFeeRules serviceFeeRules)
    {
        return serviceFeeRulesMapper.insertServiceFeeRules(serviceFeeRules);
    }

    /**
     * 修改服务费规则
     *
     * @param serviceFeeRules 服务费规则
     * @return 结果
     */
    @Override
    public int updateServiceFeeRules(ServiceFeeRules serviceFeeRules)
    {
        return serviceFeeRulesMapper.updateServiceFeeRules(serviceFeeRules);
    }

    /**
     * 通过id批量删除服务费规则信息
     *
     * @param ids 需要删除的服务费规则主键
     * @return 结果
     */
    @Override
    public int deleteServiceFeeRulesByIds(Long[] ids)
    {
        return serviceFeeRulesMapper.deleteServiceFeeRulesByIds(ids);
    }

    /**
     * 通过id删除服务费规则信息
     *
     * @param id 服务费规则主键
     * @return 结果
     */
    @Override
    public int deleteServiceFeeRulesById(Long id)
    {
        return serviceFeeRulesMapper.deleteServiceFeeRulesById(id);
    }
}
